home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SunSoft Catalyst CDWARE 1996 May to August
/
Catalyst CDWARE 1996 May to August.iso
/
.products
/
Microport_Systems
/
_install
/
install_unbundled
next >
Wrap
Text File
|
1996-02-12
|
3KB
|
144 lines
#! /bin/sh
#
# Installation shell script for installing Session Log on Hard Drive from Catalyst CDware
#
# Usage: install_ap -m<mountpoint> -p<productpath>
#
# Created: June 12, 1991
# Last Revised: January 27, Microport Systems
#
# function for error exiting
end_it () {
echo " "
echo "Hit return to exit this part of the installation..."
read answer
exit 0
}
#
# get command line parameters
#
MOUNT_PARM=$1
PRODUCT_PARM=$2
# set PRODUCT_SIZE to the size of your product in kbytes
PRODUCT_SIZE=2200
#
# get complete paths
#
MOUNT_PATH=`echo $MOUNT_PARM | egrep -e -m | sed -e 's/-m//'`
PRODUCT_DIR=`echo $PRODUCT_PARM | egrep -e -p | sed -e 's/-p//'`
#PRODUCT_PATH=$MOUNT_PATH/$PRODUCT_DIR
PRODUCT_PATH=$COMPANY_DIR
#
# get location of installation directory
#
echo
echo "Please enter the absolute path name of the directory in which you would "
echo "like to install Session Log."
echo
echo "Installation directory: "
read INSTALL_DIR
#
# verify the installation directory exists and is a directory
#
if [ ! -d "$INSTALL_DIR" ]
then
echo
echo "Creating $INSTALL_DIR ..."
mkdir $INSTALL_DIR
if [ ! -d "$INSTALL_DIR" ]
then
echo
echo
echo "Could not create the installation directory."
echo
echo "Exiting the installation script."
read a
exit 1
fi
fi
#
# verify write permission for the installation directory
#
if [ ! -w "$INSTALL_DIR" ]
then
echo
echo
echo "You do not have write permission for the installation directory: "
echo $INSTALL_DIR
echo
echo "Exiting the installation script."
read a
exit 1
fi
#
# verify free disk space
#
echo
echo "Verifying free disk space ..."
FREE_SPACE=0
df=/tmp/FREE.$$
df $INSTALL_DIR | sed /kbytes/d | sed -e '3,$d' | sed -e '1,$s/ */ /g' > $df
case `wc -l $df | sed -e 's/^ *//' | cut -f1 -d" " ` in
1) FREE_SPACE=`cat $df | cut -f4 -d" "` ;;
2) FREE_SPACE=`cat $df | sed 1d | sed 's/^ *//' | cut -f3 -d" "` ;;
esac
if [ -n $FREE_SPACE ]
then
if [ $FREE_SPACE -lt $PRODUCT_SIZE ]
then
echo
echo
echo "The Session Log installation requires $PRODUCT_SIZE kbytes of"
echo "free disk space. There is only $FREE_SPACE kbytes of free"
echo "disk space in the selected filesystem. Please free up some"
echo "disk space and try this installation again."
echo
echo "Exiting the installation script."
read a
exit 1
fi
fi
/bin/rm $df 2>/dev/null
#
# copy binaries to installation directory
#
echo
echo "Copying, uncompressing, and untar'ing files to $INSTALL_DIR ..."
cp -r $PRODUCT_PATH/_install/session_log_209_sol.tar.Z $INSTALL_DIR
cd $INSTALL_DIR
zcat $INSTALL_DIR/session_log_209_sol.tar.Z | tar xf -
echo
echo
echo "First part of installation complete!"
echo
echo "You MUST manually install the Session Log driver before"
echo "using Session Log. To install the driver and run Session Log: "
echo
echo " 1. Change directories to: $INSTALL_DIR"
echo " 2. Become super user."
echo " 3. Type the command: 'microinstall'"
echo " 4. Reboot the computer one time to active the driver."
echo " 5. Type 'mplog' from the install directory."
echo
echo " Session Log can be uninstalled at any time with the command"
echo " microuninstall"
echo
end_it